package mileena

import org.apache.commons.lang.builder.ReflectionToStringBuilder;

class AppUser 
{
	
	AppRole appRole
	String  appUserFirstName
	String  appUserMiddleName
	String  appUserLastName
	String  appUserMail
	Date    appUserSignUp
	String  appUserPassword
	String  appUserDescription
	String  appImage
	
	
	static constraints = {
		appUserFirstName(blank:false, maxSize : 50)
		appUserMiddleName(blank:false, maxSize : 50)
		appUserLastName(blank:false, maxSize : 50)
		messages(nullable:true)
		appUserMail(nullable:false, maxSize : 150)
		appUserPassword(nullable:true, maxSize : 40)
		appUserDescription(nullable:true, maxSize : 300)
		appImage(nullable:true)
	}
	
	static hasMany = [messages : AppMessage, favouritePlaces: AppPlace]
	
	String toString(){
		"$appUserMail"
	}
	
}
